]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: make WindowClone forward the 'size-changed' event
authorMaxim Ermilov <zaspire@rambler.ru>
Sun, 30 Jan 2011 22:03:12 +0000 (01:03 +0300)
committerMaxim Ermilov <zaspire@rambler.ru>
Tue, 1 Feb 2011 20:41:16 +0000 (23:41 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=640781

js/ui/workspace.js

index ddd82bcc0c9d981db0bd1c1882ac8ec74ca70b15..cf3feb5c91cb286afc39f06bbb3a7536ca552bf8 100644 (file)
@@ -104,6 +104,10 @@ WindowClone.prototype = {
 
         this._stackAbove = null;
 
+        this._sizeChangedId = this.realWindow.connect('size-changed', Lang.bind(this, function() {
+            this.emit('size-changed');
+        }));
+
         this.actor.connect('button-release-event',
                            Lang.bind(this, this._onButtonRelease));
 
@@ -157,6 +161,9 @@ WindowClone.prototype = {
     },
 
     _onDestroy: function() {
+        this.realWindow.disconnect(this._sizeChangedId);
+        this._sizeChangedId = 0;
+
         this.metaWindow._delegate = null;
         this.actor._delegate = null;
         if (this._zoomLightbox)
@@ -1325,10 +1332,10 @@ Workspace.prototype = {
                       Lang.bind(this, function() {
                           this._windowIsZooming = false;
                       }));
-        win.connect('size-changed',
-                    Lang.bind(this, function() {
-                        this.positionWindows(0);
-                    }));
+        clone.connect('size-changed',
+                      Lang.bind(this, function() {
+                          this.positionWindows(0);
+                      }));
 
         this.actor.add_actor(clone.actor);